<template>
	<view class="orderPage">
		<n-loading></n-loading>
		<u-tabs :list="list" :is-scroll="false" :current="current" @change="change" active-color="#FF5238" :bold="false"
		 inactive-color="#666666" class="tabs"></u-tabs>
		<view class="orderList" v-if="orderList">
			<!-- 无订单 -->
			<view class="nodata" v-if="orderList.length==0">
				<image src="../../static/svgIcon/noOrder.svg" mode=""></image>
				<view class="tips">暂无订单~</view>
			</view>
			<!-- 有订单 -->
			<view class="orderItem boxStyle" v-for="(item,index) of orderList" :key='item.id'>
				<!-- 订单状态信息 -->
				<view class="orderTiem">
					<!-- 商家信息 -->
					<view style="display: flex;width: 70%;">
						<view class="shopInfo">
							<dh-image class="shopLogo" :src="item.store.logo==null?'../../static/img/vector.svg':item.store.logo"
							 errorSrc="https://lovebirdopen.com/static/img/cBj/dPicture.png"></dh-image>
							 <view class="shopName ellipsis">{{item.store.name}}</view>
						</view>
						<text class="lineLabel" v-if="item.oldCard!=null">转线上订单</text>
					</view>
					<!-- 线上发货 0 -->
					<view v-if="item.is_offline==0">
						<!-- 待付款-正常单 -->
						<view v-if="item.pay_status==1 && item.order_status==1" class="orderState">待付款</view>
						<!-- 未付款-已取消 -->
						<view v-if="item.pay_status==1 && item.order_status==3" class="orderState2">已取消</view>
						<!-- 已付款-待发货-正常 -->
						<view v-if="item.pay_status==2 && item.ship_status==1 && (item.afterSales==null || item.afterSales.apply_cancel==2)" class="orderState2">待发货</view>
						<!-- 已付款-待发货-申请退款中 -->
						<view v-if="item.pay_status==2 && item.ship_status==1 && item.afterSales!=null && item.afterSales.type == 1 && item.afterSales.apply_cancel == 1" class="orderState2">
						{{item.afterSales.status==1?'审核中':(item.afterSales.status==2?'已通过审核':(item.afterSales.status==3?'未通过审核':'售后完成'))}}
						</view>
						<!-- 已付款-卖家已发货-未收货 -->
						<view v-if="item.pay_status==2 && item.ship_status==2 && item.confirm==1" class="orderState2">卖家已发货</view>
						<!-- 已付款-卖家已发货-已收货 -->
						<view class="orderState2" v-if="item.pay_status==2 && item.ship_status==2 && item.confirm==2 && (item.afterSales==null || item.afterSales.apply_cancel==2)">
							<text class="orderStateTxt">交易成功</text>
							<view class="trashDeleteBtn" @tap="deleteOrder(item.id)">
								<image class="trashDelete" src="../../static/img/trashDelete.svg"></image>
							</view>
						</view>
						<!-- 已付款-卖家已发货-已收货-申请退货中 -->
						<view v-if="item.pay_status==2 && item.ship_status==2 && item.confirm==2 && item.afterSales!=null && item.afterSales.type == 2 && item.afterSales.apply_cancel == 1" class="orderState2">
							{{item.afterSales.status==1?'审核中':(item.afterSales.status==2?'已通过审核':(item.afterSales.status==3?'未通过审核':(orderInfo.afterSales.status==4?'退货超时':'售后完成')))}}
						</view>
						<!-- 已退款 -->
						<view v-if="item.pay_status==5" class="orderState2">已退款</view>
						<!-- 已退货 -->
						<view v-if="item.ship_status==5" class="orderState">
							<text class="orderStateTxt">已退货</text>
							<view class="trashDeleteBtn" @tap="deleteOrder(item.id)">
								<image class="trashDelete" src="../../static/img/trashDelete.svg"></image>
							</view>
						</view>
					</view>
					<!-- 线下商铺自提 1 -->
					<view v-if="item.is_offline==1">
						<!-- 待付款-正常单 -->
						<view v-if="item.pay_status==1 && item.order_status==1" class="orderState">待付款</view>
						<!-- 未付款-已取消 -->
						<view v-if="item.pay_status==1 && item.order_status==3" class="orderState2">已取消</view>
						<!-- 已付款-待核销 -->
						<view v-if="item.pay_status==2 && item.ship_status==2 && item.confirm==2 && item.all_is_verification==0 && (item.afterSales==null || item.afterSales.apply_cancel==2 || item.afterSales.status==3)" class="orderState2">待核销</view>
						<view v-if="item.pay_status==2 && item.ship_status==2  && item.all_is_verification==0 && item.afterSales!=null && item.afterSales.type == 1 && item.afterSales.apply_cancel == 1" class="orderState2">
						{{item.afterSales.status==1?'审核中':(item.afterSales.status==2?'已通过审核':(item.afterSales.status==3?'未通过审核':'售后完成'))}}
						</view>
						<!-- 已付款-已完成 -->
						<view class="orderState2" v-if="item.pay_status==2 && item.ship_status==2 && item.confirm==2 && item.all_is_verification==1 && (item.afterSales==null || item.afterSales.apply_cancel==2)">
							<text class="orderStateTxt">交易成功</text>
							<view class="trashDeleteBtn" @tap="deleteOrder(item.id)">
								<image class="trashDelete" src="../../static/img/trashDelete.svg"></image>
							</view>
						</view>
					</view>
				</view>
				<!-- 物流信息 -->
				<view class="logisticsBox" v-if="item.is_offline==0 && item.pay_status==2 && item.ship_status==2 && item.confirm==1" @tap="seeLogistics(item.id)">
					<view><u-icon name="car" color="#666" size="32"></u-icon></view>
					<view class="tipsCont">
						<view class="tipsContTit ellipsis">
							<text>{{item.logisticsRecord.list[0].status}}</text>
						</view>
						<view class="time">{{item.logisticsRecord.list[0].time}}</view>
					</view>
					<u-icon name="arrow-right" color="#999999" size="20"></u-icon>
				</view>
				<!-- 该订单里面商品信息 -->
				<!-- 线上  v-if="item.is_offline==0"-->
				<view class="orderInfo" @tap="orderInfoGo(item.id,item.pay_status,item.ship_status,item.order_status,item.confirm,item.is_comment)" v-for="(goods,i) of item.items" :key='goods.id'>
					<!-- <image :src="goods.image"></image> -->
					<dh-image class="niccImg" :src="goods.image" errorSrc="https://lovebirdopen.com/static/img/cBj/dPicture.png"></dh-image>
					<view class="orderRight">
						<view class="title ellipsis">{{goods.name}}</view>
						<view class="parameter"><label>{{goods.specs}}</label></view>
						<view class="orderPrice">
							<view class="showPrice">
								￥<text>{{goods.price}}</text>
							</view>
							<view>数量 x {{goods.num}}</view>
						</view>
					</view>
				</view>
				<!-- 支付金额及优惠金额信息 -->
				<view class="count">
					<view class="discount">{{(item.order_pmt==null || parseInt(item.order_pmt)==0)?'':'优惠'+item.order_pmt}}</view>
					<view>{{item.pay_status==1?'待付款':'已付款'}}￥<text>{{item.pay_amount}}</text></view>
				</view>
				<!-- 各个状态状态下按钮 -->
				<!-- 线上发货 0 -->
				<view v-if="item.is_offline==0">
					<!-- 待付款-正常单 -->
					<view class="orderOperate" v-if="item.pay_status==1 && item.order_status==1">
						<view class="payTiem">
							<u-icon name="clock" color="#333333" size="28"></u-icon>
							<u-count-down :timestamp="termOfValidity-dateDiff(item.created_at)" :show-days="false" separator="zh" bg-color="transparent" color="#FF5238" separator-color="#333" separator-size="24" font-size="24"></u-count-down>
						</view>
						<view class="orderBut">
							<button class="addrBut" @tap="confirmShowGo(item.id)">取消订单</button>
							<button class="payBut" @tap="paymentGo(item.id)">立即付款</button>
						</view>
					</view>
					<!-- 待付款-已取消 -->
					<view class="orderOperate" v-else-if="item.pay_status==1 && item.order_status==3">
						<view class="payTiem"></view>
						<view class="orderBut">
							<button class="payBut" @tap="repurchase(item.items[0].goods_id)">重新购买</button>
						</view>
					</view>
					<!-- 已付款-待发货 -->
					<view class="orderOperate" v-else-if="item.pay_status==2 && item.ship_status==1">
						<view class="payTiem"></view>
						<view class="orderBut">
							<button class="addrBut" @tap="applyRefund(item.id)" v-if="(item.afterSales==null || item.afterSales.apply_cancel==2 ||  item.afterSales.status==3)">申请退款</button>
							<button class="addrBut mr20" 
							@tap="revokeApply(item.afterSales.aftersales_id,item.afterSales.order_id,item.afterSales.type)" 
							v-if="item.afterSales!=null && item.afterSales.type == 1 && item.afterSales.status == 1 && item.afterSales.apply_cancel == 1 && item.afterSalesTimes == null">撤销申请</button>
							<button class="remindBut" @tap="remindShipment(item.id)" v-if="(item.afterSales==null || item.afterSales.apply_cancel==2 || item.afterSales.status==3)">提醒发货</button>
						</view>
					</view>
					<!-- 已付款-卖家已发货-待收货 -->
					<view class="orderOperate" v-else-if="item.pay_status==2 && item.ship_status==2 && item.confirm==1">
						<view class="payTiem"></view>
						<view class="orderBut">
							<button class="addrBut" @tap="seeLogistics(item.id)">查看物流</button>
							<button class="remindBut" @tap="confirmReceipt(item.id)">确认收货</button>
						</view>
					</view>
					<!-- 已付款-卖家已发货-已收货-待评价/已评价 -->
					<view class="orderOperate" v-else-if="item.pay_status==2 && item.ship_status==2 && item.confirm==2">
						<view class="payTiem"></view>
						<view class="orderBut">
							<button class="addrBut mr20" 
							@tap="applyReturn(item.id)" 
							v-if="item.liquor_card_online==0 && item.is_offline==0 && (item.afterSales==null || item.afterSales.apply_cancel==2 || item.afterSales.status==3)">申请退货</button>
							<button class="addrBut mr20" 
							@tap="revokeApply(item.afterSales.aftersales_id,item.afterSales.order_id,item.afterSales.type)" 
							v-if="item.afterSales!=null && item.afterSales.type == 2 && item.afterSales.status == 1 && item.afterSales.apply_cancel == 1 && item.afterSalesTimes == null">撤销申请</button>
							<button class="addrBut" @tap="evaluateGo(item.id)" v-if="item.is_comment==1 && (item.afterSales==null || item.afterSales.apply_cancel==2 || item.afterSales.status==3)">立即评价</button>
							<button class="remindBut" @tap="repurchase(item.items[0].goods_id)">再来一单</button>
						</view>
					</view>
				</view>
				<!-- 线下商铺自提 1 -->
				<view v-if="item.is_offline==1">
					<!-- 待付款-正常单 -->
					<view class="orderOperate" v-if="item.pay_status==1 && item.order_status==1">
						<view class="payTiem">
							<u-icon name="clock" color="#333333" size="28"></u-icon>
							<u-count-down :timestamp="termOfValidity-dateDiff(item.created_at)" :show-days="false" separator="zh" bg-color="transparent" color="#FF5238" separator-color="#333" separator-size="24" font-size="24"></u-count-down>
						</view>
						<view class="orderBut">
							<button class="addrBut" @tap="confirmShowGo(item.id)">取消订单</button>
							<button class="payBut" @tap="paymentGo(item.id)">立即付款</button>
						</view>
					</view>
					<!-- 待付款-已取消 -->
					<view class="orderOperate" v-else-if="item.pay_status==1 && item.order_status==3">
						<view class="payTiem"></view>
						<view class="orderBut">
							<button class="payBut" @tap="repurchase(item.items[0].goods_id)">重新购买</button>
						</view>
					</view>
					<!-- 付款未核销 -->
					<view class="orderOperate" v-else-if="item.pay_status==2 && item.ship_status==2 && item.confirm==2 && item.all_is_verification==0">
						<view class="payTiem"></view>
						<view class="orderBut">
							<button class="addrBut mr20" @tap="applyRefund(item.id)" v-if="item.liquor_card_online==0 && item.is_offline==1 && liquorCard[0].ispickup==null && (item.afterSales==null || item.afterSales.apply_cancel==2)">申请退款</button>
							<button class="addrBut mr20" @tap="revokeApply(item.afterSales.aftersales_id,item.afterSales.order_id,item.afterSales.type)" v-if="item.afterSales!=null && item.afterSales.type == 1 && item.afterSales.status == 1 && item.afterSales.apply_cancel == 1 && item.afterSalesTimes == null">撤销申请</button>
							<button class="addrBut" @tap="orderInfoGo(item.id,item.pay_status,item.ship_status,item.order_status,item.confirm,item.is_comment)"
							 v-if="item.afterSales==null || item.afterSales.apply_cancel==2 || item.afterSales.status==3">去核销</button>
						</view>
					</view>
					<!-- 已付款-卖家已发货-已收货-待评价/已评价 -->
					<view class="orderOperate" v-else-if="item.pay_status==2 && item.ship_status==2 && item.confirm==2 && item.all_is_verification==1">
						<view class="payTiem"></view>
						<view class="orderBut">
							<button class="addrBut mr20" @tap="applyRefund(item.id)" v-if="item.liquor_card_online==0 && item.is_offline==1 && liquorCard[0].ispickup==null && (item.afterSales==null || item.afterSales.apply_cancel==2)">申请退款</button>
							<button class="addrBut mr20" @tap="revokeApply(item.afterSales.aftersales_id,item.afterSales.order_id,item.afterSales.type)" v-if="item.afterSales!=null && item.afterSales.type == 1 && item.afterSales.status == 1 && item.afterSales.apply_cancel == 1 && item.afterSalesTimes == null">撤销申请</button>
							<button class="addrBut" @tap="evaluateGo(item.id)" v-if="item.is_comment==1 && (item.afterSales==null || item.afterSales.apply_cancel==2)">立即评价</button>
							<button class="remindBut" @tap="repurchase(item.items[0].goods_id)">再来一单</button>
						</view>
					</view>
				</view>
			</view>
		</view>
		
		<!-- 取消订单确认 -->
		<u-modal v-model="confirmShow" :content="confirmCont" @confirm="cancelOrderGo" :show-cancel-button="true" :show-title="false"></u-modal>
		<!-- 确认收货确认 -->
		<u-modal v-model="confirmReceiptShow" content="是否确认收货" @confirm="confirmOrderGo" :show-cancel-button="true" :show-title="false"></u-modal>
		<!-- 确认是否删除订单 -->
		<u-modal v-model="confirmDeleteShow" content="是否删除订单" @confirm="confirmDeleteGo" :show-cancel-button="true" :show-title="false"></u-modal>
		<!-- 撤销退款/退货 -->
		<u-modal 
			v-model="tipsshow"
			:title="annulTitle"
			:content="annulContent"
			confirm-text="确认"
			cancel-text="取消"
			:show-cancel-button="true"
			confirm-color="#333333"
			cancel-color="#999999"
			:async-close="true"
			@confirm="confirmtips"
			>
		</u-modal>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
					name: '全部'
				}, {
					name: '待付款'
				}, {
					name: '待发货'
				}, {
					name: '待收货'
				}, {
					name: '待评价'
				}],
				current: null,
				// 订单列表
				orderList:[],
				isLoadMore:false,
				page: 1,
				pageSize: 10,
				payStatus:'',//支付状态
				shipStatus:'',//发货状态
				confirm:'',//收货状态
				isComment:'',//评价状态
				orderStatus:'',//订单状态
				termOfValidity:null,
				confirmCont:'',
				confirmShow:false,//取消订单确认弹窗
				cancelId:null,
				confirmReceiptShow:false,//收货确认
				receiptId:null,
				confirmDeleteShow:false,//删除订单确认
				deleteId:null,
				// 撤销申请
				annulTitle:'',
				tipsshow:false,
				annulContent:'您仅能主动撤销一次，撤销后将不能在主动撤销，且超出保障期后无法再次发起售后。',
				aftersales_id:null,
				order_id:null,
			}
		},
		onShow(){
			this.page = 1;
			this.orderList = [];
			this.getOrderList();
		},
		onLoad: function (option) {
			this.current = option.tab;
			// 从不同地方跳过来
			if(option.tab == 0){//全部
				this.payStatus = '';
				this.shipStatus = '';
				this.isComment = '';
				this.confirm = '';
				this.orderStatus = '';
			}else if(option.tab == 1){//待付款
				this.payStatus = 1;
				this.shipStatus = '';
				this.confirm = '';
				this.isComment = '';
				this.orderStatus = 1;
			}else if(option.tab == 2){//待发货
				this.payStatus = 2;
				this.shipStatus = 1;
				this.confirm = '';
				this.isComment = '';
				this.orderStatus = '';
			}else if(option.tab == 3){//待收货
				this.payStatus = 2;
				this.shipStatus = 2;
				this.confirm = 1;
				this.isComment = '';
				this.orderStatus = '';
			}else if(option.tab == 4){//待评价
				this.payStatus = 2;
				this.shipStatus = 2;
				this.confirm = 2;
				this.isComment = 1;
				this.orderStatus = '';
			}
			// this.getOrderList();
		},
		onPullDownRefresh() {
			
			this.page = 1;
			this.orderList = [];
			this.getOrderList();
			setTimeout(function () {
				uni.stopPullDownRefresh();  //停止下拉刷新动画
			}, 2000);
		},
		// 滑动到底部
		onReachBottom() {
			// if(!this.isLoadMore){
			// 	this.getOrderList()
			// }
		},
		methods: {
			
			
			
			
			// 获取订单列表
			getOrderList(){
				this.apiget('/fun/order/index',{page:this.page,pageSize:this.pageSize,pay_status:this.payStatus,ship_status:this.shipStatus,order_status:this.orderStatus,confirm:this.confirm,is_comment:this.isComment}).then(res =>{
					if(res.data.status == 200 ) {
						this.orderList = this.orderList.concat(res.data.data.list);
						this.termOfValidity = res.data.data.termOfValidity;
						if(res.data.data.list.length<this.pageSize){
							this.isLoadMore = true;
							this.status = 'nomore';
						}else if(res.data.data.list.length==this.pageSize && this.page == res.data.data.pageCount){
							this.isLoadMore = true;
							this.status = 'nomore';
						}else{
							this.status = 'loading';
							this.page = ++ this.page;
						}
					}
				})
			},
			change(index) {
				this.orderList = [];
				this.page = 1;
				this.current = index;
				if(index == 0){//全部
					this.payStatus = '';
					this.shipStatus = '';
					this.isComment = '';
					this.confirm = '';
					this.orderStatus = '';
				}else if(index == 1){//待付款
					this.payStatus = 1;
					this.shipStatus = '';
					this.confirm = '';
					this.isComment = '';
					this.orderStatus = 1;
				}else if(index == 2){//待发货
					this.payStatus = 2;
					this.shipStatus = 1;
					this.confirm = '';
					this.isComment = '';
					this.orderStatus = '';
				}else if(index == 3){//待收货
					this.payStatus = 2;
					this.shipStatus = 2;
					this.confirm = 1;
					this.isComment = '';
					this.orderStatus = '';
				}else if(index == 4){//待评价
					this.payStatus = 2;
					this.shipStatus = 2;
					this.confirm = 2;
					this.isComment = 1;
					this.orderStatus = '';
				}
				this.getOrderList()
			},
			// 转详情
			//支付状态 ps：pay_status
			//发货状态 ss：ship_status
			//订单状态 os：order_status
			//收货状态 co：confirm
			//评价状态 ic：is_comment
			//提货方式 is
			orderInfoGo(id,ps,ss,os,co,ic){
				if(ps==1 && os==1){//待付款
					uni.navigateTo({//+'&storer=tit'
						url: './orderInfoPayment?id='+id
					});
				}
				if(ps==2 && ss==1){//待发货
					uni.navigateTo({
						url: './orderInfoSend?id='+id,
					});
				}
				if(ps==2 && ss==2 && co==1){//待收货
					uni.navigateTo({
						url: './orderInfoReceived?id='+id,
					});
				}
				if(ps==2 && ss==2 && co==2){//待评价/已评价
					uni.navigateTo({
						url: './orderInfoSucceed?id='+id,
					});
				}
				if(ps==1 && os==3){//已取消
					uni.navigateTo({
						url: './orderInfoCancelled?id='+id,
					});
				}
				
			},
			// 重新购买
			repurchase(id){
				uni.navigateTo({
					url: '../index/goodsInfo?id='+id
				});
			},
			// 取消订单
			confirmShowGo(cancelId){
				this.cancelId = cancelId;
				this.confirmCont = '确定取消订单？';
				this.confirmShow = true;
			},
			// 取消订单
			cancelOrderGo(e){
				var _this = this;
				this.apipost('/fun/order/cancel',{id:this.cancelId}).then(res =>{
					if(res.data.status == 200 ) {
						uni.showToast({
							icon: 'success',
							duration:1000,
							title: '取消成功',
							success: res => {
								setTimeout(function (){
									_this.orderList = [];
									_this.page = 1;
									_this.getOrderList();
								}, 1000);
							},
						});
					}
				})
			},
			// 撤销申请
			revokeApply(aftersales_id,order_id,type){
				this.annulTitle = type==1?"撤销退款":"撤销退货";
				this.tipsshow = true;
				this.aftersales_id = aftersales_id,
				this.order_id = order_id;
			},
			confirmtips() {
				var _this = this;
				_this.tipsshow = false;
				this.apipost('/fun/bill-aftersales/cancel-after-sales',{aftersales_id:this.aftersales_id,order_id:this.order_id}).then(res =>{
					if(res.data.status == 200 ) {
						uni.showToast({
							icon: 'success',
							duration:1000,
							title: '撤销成功',
							success: ress => {
								setTimeout(function (){
									_this.orderList = [];
									_this.page = 1;
									_this.getOrderList();
								}, 1000);
							},
						});
					}
				})
			},
			// 立即支付
			paymentGo(id){
				this.apiget('/fun/pay/pay-params',{order_id:id,payment_code :'wechatpay',payment_type :'lite'}).then(res =>{
					if(res.data.status == 200 ) {
						var payData = res.data.data;
						payData.provider='wxpay';
						payData.success=function (res) {
							console.log('success:' + JSON.stringify(res));
							uni.navigateTo({
								url: './paySuccess?id='+id
							});
						};
						payData.fail=function (err) {
							console.log('fail:' + JSON.stringify(err));
						};
						uni.requestPayment(payData);
					}
				})
			},
			// 提醒发货
			remindShipment(id){
				this.apipost('/fun/order/remind-shipment',{id:id}).then(res =>{
					if(res.data.status == 200 ) {
						uni.showToast({
							icon: 'success',
							duration:1000,
							title: '提醒成功'
						});
					}
				})
			},
			// 删除订单
			deleteOrder(id){
				this.deleteId = id;
				this.confirmDeleteShow = true;
			},
			confirmDeleteGo(){
				var _this = this;
				this.apipost('/fun/order/delete',{id:this.deleteId}).then(res =>{
					if(res.data.status == 200 ) {
						uni.showToast({
							icon: 'success',
							duration:1000,
							title: '删除成功',
							success: res => {
								setTimeout(function (){
									_this.orderList = [];
									_this.page = 1;
									_this.getOrderList();
								}, 1000);
							},
						});
					}
				})
			},
			// 申請退款
			applyRefund(id){
				uni.navigateTo({
					url: '../refund/refundReason?id='+id
				});
			},
			// 申请退货
			applyReturn(id){
				uni.navigateTo({
					url: '../refund/goodsReason?id='+id
				});
			},
			// 评价
			evaluateGo(id){
				uni.navigateTo({
					url: './orderEvaluation?id='+id
				});
			},
			// 查看物流
			seeLogistics(id){
				uni.navigateTo({
					url: './logistics?id='+id
				});
			},
			// 是否确认收货
			confirmReceipt(id){
				this.receiptId = id;
				this.confirmReceiptShow = true;
			},
			confirmOrderGo(){
				var _this = this;
				this.apipost('/fun/order/confirm-order',{id:this.receiptId}).then(res =>{
					if(res.data.status == 200 ) {
						uni.showToast({
							icon: 'success',
							duration:1000,
							title: "收货成功",
							success: res => {
								setTimeout(function (){
									_this.orderList = [];
									_this.page = 1;
									_this.getOrderList();
								}, 1000);
							},
						});
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	.tabs {
		position: fixed;
		// #ifndef MP-WEIXIN
		top: 80rpx;
		// #endif
		// #ifdef MP-WEIXIN
		top: 0;
		// #endif
		left: 0;
		right: 0;
		z-index: 20;
	}

	.orderList {
		font-size: 24rpx;
		// #ifndef MP-WEIXIN
		margin: 32rpx;
		// #endif
		padding: 112rpx 0 32rpx;
		margin: 0 32rpx;
		width: inherit;

		.orderItem {
			padding: 20rpx 32rpx;
			margin-bottom: 16rpx;
			box-shadow: 0px 2px 8px rgba(255, 82, 56, 0.02);

			.orderOperate {
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-top: 16rpx;

				.payTiem {
					color: #FF5238;
				}

				.orderBut {
					display: flex;
					align-items: center;
				}

				button {
					margin: 0;
					font-size: 24rpx;
					border-radius: 30rpx;
					width: 160rpx;
					height: 60rpx;
					line-height: 60rpx;
				}

				.payBut {
					color: #FFFFFF;
					background: linear-gradient(276.81deg, #FF5238 8.46%, #FFA360 89.67%), #FF5238;
					margin-left: 20rpx;
				}

				.addrBut {
					background-color: inherit;
					border: 2rpx solid #666666;
					color: #666666;
					line-height: 58rpx;
				}
				
				.remindBut{
					margin-left: 20rpx;
					background-color: inherit;
					border: 2rpx solid #FF5238;
					color: #FF5238;
					line-height: 58rpx;
				}

				.mr20{
					margin-right: 20rpx;
				}
			}

			.count {
				display: flex;
				align-items: center;
				justify-content: flex-end;
				margin-top: 16rpx;
				font-size: 24rpx;

				text {
					font-weight: 500;
					font-size: 28rpx;
				}

				.discount {
					color: #666666;
					margin-right: 20rpx;

				}
			}

			.orderInfo {
				margin-top: 36rpx;
				display: flex;
				align-items: center;

				.orderPrice {
					margin-top: 20rpx;
					display: flex;
					align-items: center;
					justify-content: space-between;

					.showPrice {
						font-weight: 28rpx;
					}
				}

				image {
					width: 160rpx;
					height: 160rpx;
					border-radius: 8rpx;
				}
				
				.niccImg{
					width: 160rpx;
					height: 160rpx;
					border-radius: 50%;
				}

				.orderRight {
					flex: auto;
					width: 1px;
					margin-left: 10rpx;

					.title {
						font-weight: 600;
						font-size: 28rpx;
					}

					.parameter {
						margin-top: 24rpx;
						font-size: 24rpx;
						color: #666666;

						label {
							padding: 4rpx 12rpx;
							background-color: #F8F8FA;
							border-radius: 4px;
						}

						.u-icon {
							margin-left: 10rpx;
						}
					}
				}
			}
		}

		.orderTiem {
			display: flex;
			align-items: center;
			justify-content: space-between;
			color: #666666;
			
			
			.shopInfo{
				width: 50%;
				display: flex;
				font-size: 28rpx;
				line-height: 44rpx;
				
				.shopLogo{
					width: 40rpx;
					height: 40rpx;
					margin-right: 12rpx;
					border-radius: 50%;
					overflow: hidden;
				}
				.shopName{
					flex:1;
					width: 1px;
				}
			}
			
			.lineLabel{
				display: inline-block;
				height: 36rpx;
				padding: 0 16rpx;
				margin-top: 6rpx;
				margin-left: 8rpx;
				background: rgba(255, 82, 56, 0.12);
				border-radius: 40rpx;
				font-size: 20rpx;
				line-height: 36rpx;
				color: #FF5238;
			}

			.orderState {
				color: #FF5238;
			}
			
			.orderState2{
				color: #666;
			}
			.orderStateTxt{
				padding-right: 20rpx;
				box-shadow: 1px 0px 0px #EEEFF3;
			}
			.trashDeleteBtn{
				padding-left: 20rpx;
				float: right;
				
				.trashDelete{
					width: 32rpx;
					height: 32rpx;
					// float: right;
				}
			}
		}
		
		.logisticsBox{
			display: flex;
			margin-top: 16rpx;
			padding: 24rpx 37rpx 24rpx ;
			background: #F8F8FA;
			border-radius: 8rpx;
			
			.tipsCont{
				flex: 1;
				width: 1px;
				margin-left: 24rpx;
				margin-right: 30rpx;
				
				.tipsContTit{
					font-size: 24rpx;
					line-height: 40rpx;
					color: #333333;
				}
				
				.time{
					font-size: 24rpx;
					line-height: 36rpx;
					color: #666666;
				}
			}
		}

	}

	.orderPage {
		min-height: 100%;
		background-color: #F8F8FA;
	}
</style>
